export const mockData = {
  categories: [
    {
      id: 1,
      name: '生鲜蔬菜',
      icon: 'https://img.icons8.com/color/48/000000/apple.png'
    },
    {
      id: 2,
      name: '肉禽蛋品',
      icon: 'https://img.icons8.com/color/48/000000/steak.png'
    },
    {
      id: 3,
      name: '乳品烘焙',
      icon: 'https://img.icons8.com/color/48/000000/milk-bottle.png'
    },
    {
      id: 4,
      name: '酒水饮料',
      icon: 'https://img.icons8.com/color/48/000000/wine-glass.png'
    },
    {
      id: 5,
      name: '休闲零食',
      icon: 'https://img.icons8.com/color/48/000000/chocolate-bar.png'
    }
  ],
  products: [
    {
      id: 101,
      label: '新品',
      name: '有机红富士苹果',
      description: '新鲜采摘 脆甜多汁',
      price: 12.8,
      paymentOption: '积分+¥8.8',
      image: 'https://img.icons8.com/color/96/000000/apple.png'
    },
    {
      id: 102,
      label: '热卖',
      name: '澳洲进口牛排',
      description: '谷饲200天 肉质鲜嫩',
      price: 68.0,
      paymentOption: '积分+¥48.0',
      image: 'https://img.icons8.com/color/96/000000/steak.png'
    },
    {
      id: 103,
      label: '特价',
      name: '纯牛奶',
      description: '高钙低脂 250ml*12盒',
      price: 39.9,
      paymentOption: '积分+¥19.9',
      image: 'https://img.icons8.com/color/96/000000/milk-bottle.png'
    }
  ]
}

export const utils = {
  formatPrice(price) {
    return `¥${price.toFixed(2)}`
  },
  getProductLabel(type) {
    const labels = {
      new: '新品',
      hot: '热卖',
      discount: '特价'
    }
    return labels[type] || ''
  }
}